package cn.s1995.sloth.bizs.oo.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * SyhProdDTO
 *
 * @author Lex
 * @description
 * @date 2024/01/12 14:12
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class SyhProdDTO implements Serializable {

    @JsonProperty("_id")
    private Id id;
    @JsonProperty("user_id")
    private Id userId;
    @JsonProperty("name")
    private String name;
    @JsonProperty("model")
    private String model;
    @JsonProperty("style")
    private String style;
    @JsonProperty("space")
    private String space;
    @JsonProperty("category_id")
    private Object categoryId;
    @JsonProperty("send_address")
    private SendAddress sendAddress;
    @JsonProperty("delivery_method")
    private DeliveryMethod deliveryMethod;
    @JsonProperty("delivery_cycle")
    private Integer deliveryCycle;
    @JsonProperty("is_customizable")
    private Boolean isCustomizable;
    @JsonProperty("is_on_sale")
    private Boolean isOnSale;
    @JsonProperty("furniture_desc")
    private String furnitureDesc;
    @JsonProperty("furniture_sn")
    private String furnitureSn;
    @JsonProperty("create_id")
    private Id createId;
    @JsonProperty("is_delete")
    private Integer isDelete;
    @JsonProperty("delete_date")
    private Long deleteDate;
    @JsonProperty("create_date")
    private Long createDate;
    @JsonProperty("update_date")
    private Long updateDate;
    @JsonProperty("commission_type")
    private Integer commissionType;
    @JsonProperty("commission")
    private Commission commission;
    @JsonProperty("is_stock")
    private Boolean isStock;
    @JsonProperty("volume")
    private String volume;
    @JsonProperty("is_help_check")
    private Boolean isHelpCheck;
    @JsonProperty("is_help_delivery")
    private Boolean isHelpDelivery;
    @JsonProperty("shelf_life")
    private Integer shelfLife;
    @JsonProperty("price_protection")
    private Integer priceProtection;
    @JsonProperty("min_price")
    private BigDecimal minPrice;
    @JsonProperty("max_price")
    private BigDecimal maxPrice;
    @JsonProperty("is_compare_price")
    private Boolean isComparePrice;
    @JsonProperty("compare_link")
    private String compareLink;
    @JsonProperty("sell_count_total")
    private Integer sellCountTotal;
    @JsonProperty("furniture_banner_imgs")
    private List<String> furnitureBannerImgs;
    @JsonProperty("material")
    private List<String> material;
    @JsonProperty("tags")
    private List<?> tags;
    @JsonProperty("furniture_introduce")
    private List<String> furnitureIntroduce;
    @JsonProperty("ask_list")
    private List<?> askList;

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class Id implements Serializable {
        @JsonProperty("$oid")
        private String oid;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class SendAddress implements Serializable {
        @JsonProperty("province")
        private Province province;
        @JsonProperty("city")
        private Province city;
        @JsonProperty("area")
        private Province area;

        @JsonIgnoreProperties(ignoreUnknown = true)
        @Data
        public static class Province implements Serializable {
            @JsonProperty("code")
            private String code;
            @JsonProperty("name")
            private String name;
        }
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class DeliveryMethod implements Serializable {
        @JsonProperty("value")
        private String value;
        @JsonProperty("label")
        private String label;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @Data
    public static class Commission implements Serializable {

        @Getter
        @Setter
        @JsonProperty("1")
        private _$1 $1;
        @Getter
        @Setter
        @JsonProperty("2")
        private _$1 $2;

        @JsonIgnoreProperties(ignoreUnknown = true)
        @Data
        public static class _$1 implements Serializable {
            @JsonProperty("commission_value")
            private BigDecimal commissionValue;
        }
    }
}
